Business Keys

Business Keys should be implemented in grids if the customer plans to use Out-Of-Sequence Endorsements.  Business Keys are used to identify grid rows during the creation of the replacement version of the blocking endorsement. 

The Business Key field is selected during grid configuration at the bottom of the Grid Configuration screen in the Field Assignments panel.

Business Keys should be unique within a grid and should consist of some business context to the grid.  We achieve this by concatenating various grid fields to create a unique string.

Note: The Business Key should not change for the lifecycle of a term.  If needed, Business Keys can be reset on creation of a new term. However, once Business Keys are set, they must stay the same until the start of a new term.

Out-of-sequence endorsements have a lot of nuances to them in the way they are handled within the system, so it is recommended to acquire business scenarios from the customer in order to implement sufficient test cases.  Out-of-sequence endorsement testing should be part of the overall regression suite.

Best Practice for Implementing Business Keys

Once a series of fields is identified to be concatenated together to create a unique string, you can use a SaveToField() function to push the value into a Business Key field. 

Sample syntax

If IsNull([[BusinessKeyField]]) then

savetofield(BusinessKeyField,[[gridfield1]],[[gridfield2]],[[gridfield3]])

Endif

For a list of available functions, see the Full Functional Reference List.

Note: When using SaveToField() inside a grid, all fields within the syntax must be part of the grid. The system will trigger an error if any field involved is not part of the grid.

The SaveToField() function should be run from a calculated field inside the grid that is not set to Always Calculate. The calculated field should then be included in a Bind-Field Evaluation Rule.  This will ensure that upon binding the transaction, all grid rows that do not already have a Business Key will now be assigned one. It is important to note that all Business Keys using a SaveToField()function should be included in this Field Evaluation Rule to set all Business Keys at bind.

An additional Field Evaluation Rule should be created for the purpose of setting Business Keys on an out-of-sequence transaction. The replacement transaction is created prior to the Bind-Field Evaluation Rule running so the system will not recognize rows with the same Business Key unless the key is set prior to binding. A trigger is required for this Field Evaluation Rule to be configured as below.

Example: For information on creating a Field Evaluation Rules, please see Managing Field Evaluation Rules.

Field

Operator

Value

Is Out of Sequence

Equals

true

Note: Is Out of Sequence is a core placeholder field.  This can also be used in a calculated field a [[IsOutofSequenceEndorsementAdjustment]].

This trigger should be added to a Field Evaluation Rule set to run when saving a grid row in the endorsement. The Field Evaluation Rule should use the same fields as above. Each grid in which you are including Business Keys should be included in this Field Evaluation Rule. This will ensure that on an out-of-sequence endorsement the Business Key is created during the transaction so that on bind, the system will recognize the same Business Key exists in the blocking transaction and the replacement will end up with one row rather than two.